package com.jxc.biz.impl;

import com.jxc.biz.LibraryBiz;
import com.jxc.dao.LibraryDao;
import com.jxc.dao.OrderDao;
import com.jxc.entity.Inquiry;
import com.jxc.entity.Library;
import com.jxc.entity.Order;
import com.jxc.util.PageBean;

public class LibraryBizImpl implements LibraryBiz {

	private LibraryDao dao;
	private OrderDao orderDao;

	public void deleteLibrary(Library library) {
		dao.deleteLibrary(library);
	}

	public Library getLibrary(Library library) {
		return dao.getLibrary(library);
	}
	public PageBean getLibraryList(String hql, PageBean pb) {
		return dao.getLibraryList(hql, pb);
	}

	public void insertLibrary(Library library) {
		dao.insertLibrary(library);
		Order o=library.getOrder();
		o.setState("3");
		orderDao.updateOrder(o);
	}
	public void updateLibrary(Library library) {
		dao.updateLibrary(library);
	}
	public LibraryDao getDao() {
		return dao;
	}

	public void setDao(LibraryDao dao) {
		this.dao = dao;
	}

	public OrderDao getOrderDao() {
		return orderDao;
	}

	public void setOrderDao(OrderDao orderDao) {
		this.orderDao = orderDao;
	}
}
